package com.mz.ozy.mvp.model;

import android.content.Context;

import com.mz.ozy.constants.Constants;
import com.mz.ozy.net.RetrofitUtils;
import com.mz.ozy.utils.JsonUtils;

import java.util.HashMap;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.ResponseBody;

/**
 * Created by administrator on 2018/12/3.
 */
public class FollowModel {
    public static final int PAPER_TYPE = 0;
    public static final int DAREN_TYPE = 1;
    public static final int DYNAMIC_TYPE = 2;
    public static final int SHOP_TYPE = 3;
    public static final int COURSE_TYPE = 4;

    /**
     * @param context
     * @param oid
     * @param sType   0文章 1达人 2动态  3-商店  4-课程
     * @return
     */
    public Observable<ResponseBody> followTheObject(Context context, int oid, int sType) {
        Map<String, String> jsonObject = new HashMap<>();
        jsonObject.put("cid", oid + "");
//        jsonObject.put("sType", sType + "");
        return RetrofitUtils.getApiService(context).post(Constants.TransCode.TransCode10159, JsonUtils.requestJsonDate(jsonObject), Constants.tokenId);
    }
}


